<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>{{title}}</title>

  <link rel="stylesheet" href="//cdn.bootcss.com/zui/1.8.1/css/zui.min.css">
  <link rel="stylesheet" href="/public/css/zui-theme.min.css">
  <link href="/public/css/jquery.idcode.css" type="text/css" rel="stylesheet">
  <link href="/public/css/style.css" type="text/css" rel="stylesheet">
  <style>html,body{height:100%;}body{background: url('/public/imgs/bg.png') no-repeat; background-size: 100% 100%;}</style>
</head>
<body>
  <div class="modal fade" id="loginModal">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal"></button>
          <h4 class="modal-title">{{title}}</h4>
        </div>
        <div class="modal-body">
          <form>
            <div class="form-group">
              <label for="exampleInputAccount1">账号</label>
              <input type="text" class="form-control" id="exampleInputAccount1" placeholder="电子邮件/手机号/用户名">
            </div>
            <div class="form-group">
              <label for="exampleInputPassword1">密码</label>
              <input type="password" class="form-control" id="exampleInputPassword1" placeholder="">
            </div>
            <div class="form-group row">
              <div class="col-sm-6">
                <input type="text" class="form-control ht-input" id="verifyCode" placeholder="请输入验证码">
              </div>
              <div class="col-sm-6 col-form-label">
                <span id="idcode"></span>
              </div>
            </div>
            <button type="submit" class="btn btn-primary" id="btn">提交</button>
          </form>
        </div>
      </div>
    </div>
  </div>
  
  <script src="//cdn.bootcss.com/zui/1.8.1/lib/jquery/jquery.js"></script>
  <script src="//cdn.bootcss.com/zui/1.8.1/js/zui.min.js"></script>
  <script src="/public/js/jquery.idcode.js"></script>
  <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
  <script>
    $('#loginModal').modal({
        keyboard : false,
        show     : true,
        backdrop: false
    })
    $.idcode.setCode();
    $('#btn').on('click', function (event) {
      event.preventDefault();
      event.stopPropagation();
      var verified = $.idcode.validateCode();
      if (!verified) {
        return;
      } else {
        var userName = md5($('#userName').val());
        var password = md5($('#password').val());
        for(var i = 0, l = userList.length; i < l; i += 1){
          if (userName == userList[i].userName && password == userList[i].password) {
            window.open('http://47.106.160.233:8080/static/开元1号资产管理计划净值.zip', '_blank');
            window.location.href = 'http://www.hongtaqh.com';
          }else{
            alert('信息填写错误，请重试');
          }
        }
      }
    })
  </script>
</body>
</html>